package com.tz.farmer.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 渔场养殖操作流程
 */
@Data
@ToString(exclude = {"deleted"})
public class FarmerProcess implements Serializable {

    @TableId(type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(hidden = true)
    private String market;
    /**
     * 产品名称不能为空
     */
    @NotBlank(message = "产品名称不能为空")
    @ApiModelProperty(value = "产品名称/捕捞渔船")
    private String name;
    /**
     * 操作类别不能为空
     */
    @NotBlank(message = "操作类别不能为空")
    @ApiModelProperty(value = "操作类别/渔获种类")
    private String opType;
    /**
     * 投入品不能为空
     */
    @NotBlank(message = "投入品不能为空")
    @ApiModelProperty(value = "投入品/作业渔区")
    private String detail;
    /**
     * 操作时间不能为空
     */
    @NotNull(message = "操作时间不能为空")
    @ApiModelProperty(value = "操作日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date opDate;

    @ApiModelProperty(hidden = true)
    private Integer status;

    @ApiModelProperty(hidden = true)
    private Integer deleted;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createAt;
}
